import request from '@/libs/http/index'

// list
export function getAttachementApi(params) {
  return request({
    url: '/attachement',
    method: 'GET',
    params
  })
}

// create
export function addAttachementApi(data) {
  return request({
    url: '/attachement',
    method: 'POST',
    data
  })
}

export function updateAttachementApi(data) {
  return request({
    url: '/attachement',
    method: 'PATCH',
    data
  })
}

export function delAttachementApi(id) {
  return request({
    url: `/attachement/${id}`,
    method: 'DELETE'
  })
}

export function detailAttachementApi(id) {
  return request({
    url: `/attachement/${id}`,
    method: 'GET'
  })
}